home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / DELPHI32 / TOOLBARS / TRACKBAR / TRACKBAR.TXT < prev    next >
Text File  |  1996-01-07  |  5KB  |  195 lines

  1. Windows 95 Trackbar Control for Delphi  (16-bit)
  2.  
  3. This Windows 95 trackbar (slider) component uses the Windows 95 CUSTCNTL.DLL,
  4. which is probably in your WINDOWS\SYSTEM directory to provide it's
  5. functionality.  It probably requires windows 95 to run...
  6.  
  7. Programmed be Colin Wilson (colin@woozle.compulink.co.uk).
  8.  
  9. Freeware.
  10.  
  11. Public methods
  12. --------------
  13.  
  14. procedure SetTic (position : LongInt);
  15.  
  16.   Places a tick mark at the specified position.
  17.  
  18.  
  19. function GetTic (index : Integer) : LongInt;
  20.  
  21.   Gets the position of the tick mark 'index', where 0 is the first mark, 1 is
  22.   the second, etc.
  23.  
  24.  
  25. function GetTicPos (index : Integer) : LongInt;
  26.  
  27.   Gets ths physical position in screen coordinates of the tick mark 'index'
  28.  
  29. procedure ClearTics (Redraw : boolean);
  30.  
  31.   Clears all tick marks.
  32.  
  33.  
  34. function GetNumTics : Integer;
  35.  
  36.   Gets the number of tick marks.
  37.  
  38.  
  39. procedure ClearSelection (Redraw : boolean);
  40.  
  41.   Clears the SelectionStart and SelectionEnd properties. (see below).
  42.  
  43.  
  44. procedure GetThumbRect (var Rect : TRect);
  45.  
  46.   Gets the rectangle containing the 'thumb'  (the bit that slides).
  47.  
  48.  
  49. procedure GetChannelRect (var Rect : TRect);
  50.  
  51.   Gets the rectangle of the channel in which the thumb slides.
  52.  
  53.  
  54. published properties
  55. --------------------
  56.  
  57. property Min : LongInt;
  58.  
  59.   The minimum value of the slider.
  60.  
  61.  
  62. property Max : LongInt;
  63.  
  64.   The maximum position of the slider.
  65.  
  66.  
  67. property SelectionStart : LongInt;
  68.  
  69.   The start position of the current selection.  Must be <= SelectionEnd below.
  70.  
  71.  
  72. property SelectionEnd : LongInt;
  73.  
  74.   The end position of the current selection.  Must be >= SelectionStart above.
  75.  
  76.  
  77. property Position : LongInt;
  78.  
  79.   The current position of the thumb.
  80.  
  81.  
  82. property TickFreq : Integer;
  83.  
  84.   Controls how often a tick is displayed if the tbAutoticks style (below) is set.
  85.  
  86.  
  87. property Style : tbStyles read Styles write SetStyles;
  88.  
  89.   The following styles can be set to control how the slider is displayed:
  90.  
  91.     tbAutoticks        : Automatically display tick marks, based on the TickFreq
  92.                          property above.
  93.  
  94.     tbVert             : Display a vertical slider.
  95.  
  96.     tbReversed         : Reverse the direction of the thumb arrow.
  97.  
  98.     tbBoth             : Display a rectangular - rather than an arrow - thumb.
  99.  
  100.     tbNoTicks          : Don't display any ticks.
  101.  
  102.     tbEnableSelRange   : Display a wide channel, even if the SelectionStart and
  103.                          SelectionEnd properties are equal.
  104.  
  105.     tbFixedLength      : ???
  106.  
  107.     tbNoThumb          : Don't display a thumb - handy if you just want to
  108.                          display a selection.
  109.  
  110. property PageSize : LongInt
  111.  
  112.   The number of positions the thumb is moved if you press the Page Up & Page
  113.   Down keys.  Defaults to 2.
  114.  
  115.  
  116. property LineSize : LongInt
  117.  
  118.   The number of positions the thumb is moved if you press the Up & Down arrow
  119.   keys.  Defaults to 1.
  120.  
  121.  
  122. property ThumbLength : Integer
  123.  
  124.   Controls the size of the thumb.
  125.  
  126.  
  127. property Visible;  (Standard property)
  128.  
  129.   Determines whether the control is visible.
  130.  
  131.  
  132. property Enabled;  (Standard property)
  133.  
  134.   Determines whether the control is enabled.
  135.  
  136.  
  137. Published Events
  138. ----------------
  139.  
  140. property OnLineUp : TNotifyEvent
  141.  
  142.   Generated when you press the up-arrow key.
  143.  
  144.  
  145. property OnLineDown : TNotifyEvent
  146.  
  147.   Generated when you press the down-arrow key.
  148.  
  149.  
  150. property OnPageUp : TNotifyEvent
  151.  
  152.   Generated when you press the Page Up key.
  153.  
  154.  
  155. property OnPageDown : TNotifyEvent
  156.  
  157.   Generated when you press the Page Down key.
  158.  
  159.  
  160. property OnThumbPosition : TNotifyEvent
  161.  
  162.   Generated when the thumb's position changes.
  163.  
  164.  
  165. property OnThumbTrack : TNotifyEvent
  166.  
  167.   Generated as the thumb is moved with the mouse.
  168.  
  169.  
  170. property OnTop : TNotifyEvent
  171.  
  172.   Generated when the thumb reaches the top or left of the slider.
  173.  
  174.  
  175. property OnBottom : TNotifyEvent
  176.  
  177.   Generated when the thumb reaches the bottom or right of the slider.
  178.  
  179.  
  180. property OnEndTrack : TNotifyEvent
  181.  
  182.   Generated when the mouse is released after moving the thumb, or if the thumb
  183.   moves for any other reason.  This is the most useful of the thumb position
  184.   events.
  185.  
  186.  
  187. property OnEnter       (Standard property)
  188. property OnExit;       (Standard property)
  189. property OnDragDrop;   (Standard property)
  190. property OnDragOver;   (Standard property)
  191. property OnEndDrag;    (Standard property)
  192. property OnKeyDown;    (Standard property)
  193. property OnKeyPress;   (Standard property)
  194. property OnKeyUp;      (Standard property)
  195.